package day10.homework;

/**
 * 动物类
 */
public class Animal {
    //*  颜色 */
    private String color;
    //* 年龄 */
    private int age;
    //* 叫唤 */
    private String shout;
    public Animal(){

    }
    public Animal(String color,int age,String shout){
        this.color = color;
        this.age = age;
        this.shout = shout;
    }
    public void share(){
        System.out.println("这是"+ this.color +"的"+ age + " 岁，会" + shout + "叫的动物");
    }
    public String getColor(){
        return color;
    }
    public void setColor(String color){
        this.color = color;
    }
    public int getAge(){
        return age;
    }
    public void setAge(int age){
        this.age = age;
    }
    public String getShout(){
        return shout;
    }
    public void setShout(String shout){
        this.shout = shout;
    }

    public static void main(String[] args) {
        Canidae canidae = new Canidae("狗","狼");
        canidae.varieties1();
        Felidae felidae = new Felidae("猫","老虎","狮子");
        felidae.varieties();
    }
}
